﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Baustein {

    class Clprim : CBaustein {
        public int iDez = 0;
        public Clprim(int iAnzEin, string strName)
            : base(iAnzEin, strName) {
            this.StrName = "Prim-Baustein " + strName;
        }
        public void calc() {
            int iErg = 0;
            bAusgang = false;
            for (int i = 0; i < this.IAnzEin; i++) {
                if (BEingaenge[i] == true) {
                    iErg = iErg + 2 ^ i;
                }
            }
            iDez = iErg;
            for (int i = 1; i < iErg; i++) {
                if ((iErg / i != 0) && (iErg != 1)) {
                    bAusgang = true;
                }
            }
        }
    }
}